Optimal. Leaf size=162 \[ \frac {(a+b x) (A b-a B)}{a^2 x \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {A (a+b x)}{2 a x^2 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {b \log (x) (a+b x) (A b-a B)}{a^3 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {b (a+b x) (A b-a B) \log (a+b x)}{a^3 \sqrt {a^2+2 a b x+b^2 x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 162, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {770, 77} \[ \frac {(a+b x) (A b-a B)}{a^2 x \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {b \log (x) (a+b x) (A b-a B)}{a^3 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {b (a+b x) (A b-a B) \log (a+b x)}{a^3 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {A (a+b x)}{2 a x^2 \sqrt {a^2+2 a b x+b^2 x^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rule 770
Rubi steps
\begin {align*} \int \frac {A+B x}{x^3 \sqrt {a^2+2 a b x+b^2 x^2}} \, dx &=\frac {\left (a b+b^2 x\right ) \int \frac {A+B x}{x^3 \left (a b+b^2 x\right )} \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {\left (a b+b^2 x\right ) \int \left (\frac {A}{a b x^3}+\frac {-A b+a B}{a^2 b x^2}+\frac {A b-a B}{a^3 x}+\frac {b (-A b+a B)}{a^3 (a+b x)}\right ) \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=-\frac {A (a+b x)}{2 a x^2 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {(A b-a B) (a+b x)}{a^2 x \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {b (A b-a B) (a+b x) \log (x)}{a^3 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {b (A b-a B) (a+b x) \log (a+b x)}{a^3 \sqrt {a^2+2 a b x+b^2 x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 79, normalized size = 0.49 \[ -\frac {(a+b x) \left (2 b x^2 \log (x) (a B-A b)+2 b x^2 (A b-a B) \log (a+b x)+a (a A+2 a B x-2 A b x)\right )}{2 a^3 x^2 \sqrt {(a+b x)^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.87, size = 69, normalized size = 0.43 \[ \frac {2 \, {\left (B a b - A b^{2}\right )} x^{2} \log \left (b x + a\right ) - 2 \, {\left (B a b - A b^{2}\right )} x^{2} \log \relax (x) - A a^{2} - 2 \, {\left (B a^{2} - A a b\right )} x}{2 \, a^{3} x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 117, normalized size = 0.72 \[ -\frac {{\left (B a b \mathrm {sgn}\left (b x + a\right ) - A b^{2} \mathrm {sgn}\left (b x + a\right )\right )} \log \left ({\left | x \right |}\right )}{a^{3}} + \frac {{\left (B a b^{2} \mathrm {sgn}\left (b x + a\right ) - A b^{3} \mathrm {sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{a^{3} b} - \frac {A a^{2} \mathrm {sgn}\left (b x + a\right ) + 2 \, {\left (B a^{2} \mathrm {sgn}\left (b x + a\right ) - A a b \mathrm {sgn}\left (b x + a\right )\right )} x}{2 \, a^{3} x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 92, normalized size = 0.57 \[ -\frac {\left (b x +a \right ) \left (-2 A \,b^{2} x^{2} \ln \relax (x )+2 A \,b^{2} x^{2} \ln \left (b x +a \right )+2 B a b \,x^{2} \ln \relax (x )-2 B a b \,x^{2} \ln \left (b x +a \right )-2 A a b x +2 B \,a^{2} x +A \,a^{2}\right )}{2 \sqrt {\left (b x +a \right )^{2}}\, a^{3} x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.59, size = 164, normalized size = 1.01 \[ \frac {\left (-1\right )^{2 \, a b x + 2 \, a^{2}} B b \log \left (\frac {2 \, a b x}{{\left | x \right |}} + \frac {2 \, a^{2}}{{\left | x \right |}}\right )}{a^{2}} - \frac {\left (-1\right )^{2 \, a b x + 2 \, a^{2}} A b^{2} \log \left (\frac {2 \, a b x}{{\left | x \right |}} + \frac {2 \, a^{2}}{{\left | x \right |}}\right )}{a^{3}} - \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} B}{a^{2} x} + \frac {3 \, \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} A b}{2 \, a^{3} x} - \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} A}{2 \, a^{2} x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {A+B\,x}{x^3\,\sqrt {{\left (a+b\,x\right )}^2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.48, size = 131, normalized size = 0.81 \[ \frac {- A a + x \left (2 A b - 2 B a\right )}{2 a^{2} x^{2}} - \frac {b \left (- A b + B a\right ) \log {\left (x + \frac {- A a b^{2} + B a^{2} b - a b \left (- A b + B a\right )}{- 2 A b^{3} + 2 B a b^{2}} \right )}}{a^{3}} + \frac {b \left (- A b + B a\right ) \log {\left (x + \frac {- A a b^{2} + B a^{2} b + a b \left (- A b + B a\right )}{- 2 A b^{3} + 2 B a b^{2}} \right )}}{a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________